﻿@model BusinessLibrary.PersonEdit
@using Csla.Web.Mvc

@{
  ViewData["Title"] = "Edit";
}

<h1>Edit</h1>

<h4>PersonEdit</h4>
<hr />
<div class="row">
  <div class="col-md-4">
    <form asp-action="Edit">
      <div asp-validation-summary="ModelOnly" class="text-danger"></div>
      <div class="form-group">
        <label asp-for="Id" class="control-label"></label>
        @Html.DisplayFor(model => model.Id)
      </div>
      <div class="form-group">
        <label asp-for="Name" class="control-label"></label>
        <input asp-for="Name" class="form-control" />
        <span asp-validation-for="Name" class="text-danger"></span>
        <span class="text-danger">@Html.ErrorFor(model => model.Name)</span>
        <span class="text-warning">@Html.WarningFor(model => model.Name)</span>
        <span class="text-info">@Html.InformationFor(model => model.Name)</span>
      </div>
      <div class="form-group">
        <input type="submit" value="Save" class="btn btn-primary" />
      </div>
    </form>
  </div>
</div>

<div>
  <a asp-action="Index">Back to List</a>
</div>

@section Scripts {
  @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}
